package com.itheima.tlias.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
@Slf4j
@RestController
@RequestMapping("/session")
public class SessionController {
    @GetMapping("/request")
    public void request(HttpServletRequest request) {
       /* HttpSession session = request.getSession();
        session.setAttribute("userId", 1);*/
    }

    @GetMapping("/response")
    public void  response(HttpServletRequest request){
       /* HttpSession session = request.getSession();
        Object userId = session.getAttribute("userId");
        log.info((String) userId);*/
    }
}
